<!-- directive:title Validation -->
<!-- directive:breadcrumb Validation -->
<div class='panel-body'>
    <tabset class="tab-container">
        <tab heading="校验基础">
            <form id="f1f1f" action="#" method="get" class="form-horizontal" name="fm" ng-submit="signupForm()">
                <h2>表单 </h2>
                <script type="text/xianjs" ui-bs>
                    <form id="f1f1f" action="#" method="get" name="fm" class="form-horizontal" ng-submit="signupForm()">
                            /* 校验项 */
                    </form>
                </script>
                <h2>必填项验证 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容"
                            name="d1" ng-model="signup.name" required/>
                </script>
                <input type="text" class="form-control" placeholder="请输入内容"
                        name="d1" ng-model="signup.name" required/>
                <h6>某个表单输入是否已填写</h6>
                <pre>fm.d1.$pristine ( 原始状态 ) = {{ fm.d1.$pristine }}</pre>
                <pre>fm.d1.$dirty ( 染指 ) = {{ fm.d1.$dirty }}</pre>
                <pre>fm.d1.$valid ( 合法 ) = {{ fm.d1.$valid }}</pre>
                <pre>fm.d1.$invalid ( 非法 ) = {{ fm.d1.$invalid }}</pre>
                <pre>fm.d1.$error ( 错误 ) = {{ fm.d1.$error }}</pre>
                <pre>fm.d1.$error.required ( 必填 ) = {{ fm.d1.$error.required }}</pre>
                <pre>fm.submitted ( 提交按钮 ) = {{ fm.submitted }}</pre>
                <button type="button" class="btn btn-sm btn-default" ng-click="signup.name='haha'">被动改变值...</button>
                <h2>隐藏域判断 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容"
                            ng-model="hhhide"/>
                    <input type="hidden" class="form-control" placeholder="请输入内容"
                            name="h12" ng-model="hhhide" required/>
                </script>
                <input type="text" class="form-control" placeholder="请输入内容"
                        ng-model="hhhide"/>
                <input type="hidden" class="form-control" placeholder="请输入内容"
                        name="h12" ng-model="hhhide" required/>
                <h6>验证表单隐藏域的校验h12 = {{ h12 }}</h6>
                <pre>fm.h12.$dirty && fm.h12.$valid ( 染指并合法 ) = {{ fm.h12.$dirty && fm.h12.$valid }}</pre>
                <pre>fm.h12.$error ( 错误 ) = {{ fm.h12.$error }}</pre>
                <pre>fm.h12.$error.required ( 必填 ) = {{ fm.h12.$error.required }}</pre>
                <h2>电子邮件 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="email" class="form-control" placeholder="请输入内容"
                            name="email" ng-model="user.email" ng-model="signup.email"/>
                </script>
                <input type="email" class="form-control" placeholder="请输入内容"
                        name="email" ng-model="user.email" ng-model="signup.email"/>
                <h6>验证输入内容是否是电子邮件</h6>
                <pre>fm.email.$dirty && fm.email.$valid ( 染指并合法 ) = {{ fm.email.$dirty && fm.email.$valid }}</pre>
                <pre>fm.email.$error ( 错误 ) = {{ fm.email.$error }}</pre>
                <pre>fm.email.$error.email ( 邮件 ) = {{ fm.email.$error.email }}</pre>
                <h2>数字 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="number" class="form-control" placeholder="请输入内容"
                            name="age" ng-model="signup.age"/>
                </script>
                <input type="number" class="form-control" placeholder="请输入内容"
                        name="age" ng-model="signup.age"/>
                <h6>验证输入内容是否是数字 将input的类型设置为number</h6>
                <pre>fm.age.$dirty && fm.age.$valid ( 染指并合法 ) = {{ fm.age.$dirty && fm.age.$valid }}</pre>
                <pre>fm.age.$error ( 错误 ) = {{ fm.age.$error }}</pre>
                <pre>fm.age.$error.number ( 数字 ) = {{ fm.age.$error.number }}</pre>
                <h2>最小最大数字 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="number" class="form-control" placeholder="请输入内容"
                            name="age2" min="0" max="10" ng-model="signup.age2"/>
                </script>
                <input type="number" class="form-control" placeholder="请输入内容"
                        name="age2" min="0" max="10" ng-model="signup.age2"/>
                <h6>验证输入内容是否是数字 将input的类型设置为number</h6>
                <pre>fm.age2.$dirty && fm.age2.$valid ( 染指并合法 ) = {{ fm.age2.$dirty && fm.age2.$valid }}</pre>
                <pre>fm.age2.$error ( 错误 ) = {{ fm.age2.$error }}</pre>
                <pre>fm.age2.$error.min ( 最小数字 ) = {{ fm.age2.$error.min }}</pre>
                <pre>fm.age2.$error.max ( 最大数字 ) = {{ fm.age2.$error.max }}</pre>
                <h2>css样式类 </h2>
                <h6>Angular在验证输入或表单时的有效有否是已经提供了一些类 像是 (ng-valid,ng-invalid,ng-pristineandng-dirty).你可以编辑自己喜欢的CSS . 你可以私有定制化这些类来实现特定的场景应用.</h6>
                <h6><code>.ng-valid{  }</code><br />
                <code>.ng-invalid{  }</code><br />
                <code>.ng-pristine{  }</code><br />
                <code>.ng-dirty{  }</code><br />
                <code>.ng-invalid-required{  }</code><br />
                <code>.ng-invalid-minlength {  }</code><br />
                <code>.ng-valid-max-length{  }</code></h6>
                <h2>验证方式 </h2>
                <h6>如果你想保留错误验证的实时性 那么可以在用户离开该输入框时显示错误信息。</h6>
                <h6>要做到这一点 我们可以添加一个指令 将添加一个新的变量。 我们使用 ngFocus 指令 它看起来像</h6>
                <h6>要使用 ngFocus  我们只需要简单加上这个指令到输入框元素上 像这样</h6>
                <script type="text/xianjs" ui-bs>
                    <input ng-class="{error: fm.name.$dirty && fm.name.$invalid}"
                            type="text" placeholder="Name" name="name" ng-model="signup.name"
                            ng-minlength=3 ng-maxlength=20 required ng-focus / >
                </script>
                <h6>加上 ngFocus 指令后 将在输入框的blur和focus事件中注册相应操作</h6>
                <h6>当焦点在该输入框时 它添加一个class（ng-focused） 并且该输入框的$focused属性也将变为true</h6>
                <h6>因此 你可以根据需求是否在焦点上来个性化设置显示错误消息。例如</h6>
                <script type="text/xianjs" ui-bs>
                    <div class="error" ng-show="fm.name.$dirty && fm.name.$invalid && !fm.name.$focused">
                </script>
                <h6>如果只在用户提交表单时才显示错误信息,在ng-show指令中加入fm.submitted </h6>
                <script type="text/xianjs" ui-bs>
                    <input type="text" placeholder="Name" name="name" ng-model="signup.name" ng-minlength=3 ng-maxlength=20 required />
                    <div class="error" ng-show="fm.name.$invalid && fm.submitted"/>
                        <small class="error" ng-show="fm.name.$error.required">你的名字是必需的</small/>
                    </div/>
                </script>
                <h6>仅当signup.submitted设置为true时 容纳错误信息的div才会展示出来。在signupForm操作中实现这个行为 如下所示</h6>
                <h2>最大长度 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容"
                            name="max" ng-maxlength="20" ng-model="signup.max"/>
                </script>
                <input type="text" class="form-control" placeholder="请输入内容"
                        name="max" ng-maxlength="20" ng-model="signup.max"/>
                <h6>验证表单输入的文本长度是否小于或等于某个最大值</h6>
                <pre>fm.max.$dirty && fm.max.$valid ( 染指并合法 ) = {{ fm.max.$dirty && fm.max.$valid }}</pre>
                <pre>fm.max.$error ( 错误 ) = {{ fm.max.$error }}</pre>
                <pre>fm.max.$error.maxlength ( 最大长度 ) = {{ fm.max.$error.maxlength }}</pre>
                <h2>最小长度 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容"
                            name="min" ng-model="signup.min" ng-minlength="5" />
                </script>
                <input type="text" class="form-control" placeholder="请输入内容"
                        name="min" ng-model="signup.min" ng-minlength="5" />
                <h6>验证表单输入的文本长度是否大于某个最小值</h6>
                <pre>fm.min.$dirty && fm.min.$valid ( 染指并合法 ) = {{ fm.min.$dirty && fm.min.$valid }}</pre>
                <pre>fm.min.$error ( 错误 ) = {{ fm.min.$error }}</pre>
                <pre>fm.min.$error.minlength ( 最小长度 ) = {{ fm.min.$error.minlength }}</pre>
                <h2>隐藏控件判断 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" ng-if="wondernghide" placeholder="请输入内容"
                            ng-model="wonderhide" name="wonderhide" required/>
                </script>
                <input type="text" class="form-control" ng-if="wondernghide" placeholder="请输入内容"
                        ng-model="wonderhide" name="wonderhide" required/>
                <input type="button" class="btn btn-default" ng-click="wondernghide = 1" value="显示">
                <input type="button" class="btn btn-default" ng-click="wondernghide = 0" value="隐藏">
                <h6>验证表单隐藏域的校验</h6>
                <pre>wondernghide = {{ wondernghide }} wonderhide = {{ wonderhide }} </pre>
                <pre>name="wonderhide" type="text" required</pre>
                <pre>fm.wonderhide.$dirty && fm.wonderhide.$valid ( 染指并合法 ) = {{ fm.wonderhide.$dirty && fm.wonderhide.$valid }}</pre>
                <pre>fm.wonderhide.$error ( 错误 ) = {{ fm.wonderhide.$error }}</pre>
                <pre>fm.wonderhide.$error.required ( 必填 ) = {{ fm.wonderhide.$error.required }}</pre>
                <h2>正则表达式匹配 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容(只能输入字母)"
                            name="pat" ng-pattern="/[a-zA-Z]/" ng-model="signup.pat" />
                </script>
                <input type="text" class="form-control" placeholder="请输入内容(只能输入字母)"
                        name="pat" ng-pattern="/[a-zA-Z]/" ng-model="signup.pat" />
                <h6>使用 ng-pattern="/PATTERN/" 来确保输入能够匹配指定的正则表达式</h6>
                <pre>fm.pat.$dirty && fm.pat.$valid ( 染指并合法 ) = {{ fm.pat.$dirty && fm.pat.$valid }}</pre>
                <pre>fm.pat.$error ( 错误 ) = {{ fm.pat.$error }}</pre>
                <pre>fm.pat.$error.pattern ( 正则 ) = {{ fm.pat.$error.pattern }}</pre>
                <h2>URL </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="url" class="form-control" placeholder="请输入内容"
                            name="homepage" ng-model="signup.homepage">
                </script>
                <input type="url" class="form-control" placeholder="请输入内容"
                        name="homepage" ng-model="signup.homepage">
                <h6>&nbsp;验证输入内容是否是URL 将input的类型设置为 url</h6>
                <pre>fm.homepage.$dirty && fm.homepage.$valid ( 染指并合法 ) = {{ fm.homepage.$dirty && fm.homepage.$valid }}</pre>
                <pre>fm.homepage.$error ( 错误 ) = {{ fm.homepage.$error }}</pre>
                <pre>fm.homepage.$error.number ( URL ) = {{ fm.homepage.$error.number }}</pre>
                <h2>自定义验证 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="text" class="form-control" placeholder="请输入内容"
                            name="un" ng-model="signup.un" ensure-unique="un" required>
                </script>
                <input type="text" class="form-control" placeholder="请输入内容"
                        name="un" ng-model="signup.un" ensure-unique="un" required>
                <h6>&nbsp;验证输入内容是否数据库唯一</h6>
                <pre>fm.un.$dirty && fm.un.$valid ( 染指并合法 ) = {{ fm.un.$dirty && fm.un.$valid }}</pre>
                <pre>fm.un.$error ( 错误 ) = {{ fm.un.$error }}</pre>
                <pre>fm.un.$error.required ( 必填 ) = {{ fm.un.$error.required }}</pre>
                <pre>fm.un.$error.unique ( 唯一 ) = {{ fm.un.$error.unique }}</pre>
                <script type="text/xianjs" ui-bs>
                    app.directive('ensureUnique', ['$http', function($http) {
                            return {
                                require: 'ngModel',
                                link: function(scope, ele, attrs, c) {
                                    scope.$watch(attrs.ngModel, function() {
                                        c.$setValidity('unique', false);//false 代表错误
                                    });
                            }
                        }
                    }]);
                </script>
                <h2>JSON格式字符串校验 </h2>
                <script type="text/xianjs" ui-bs>
                    <textarea style="width:100%;height:30px" ng-model="json" name="json" json-str placeholder="输入标准的json格式"></textarea>
                </script>
                <textarea style="width:100%;height:30px" ng-model="json" name="json" json-str placeholder="输入标准的json格式"></textarea>
                <h6>&nbsp;验证输入内容是否符合json规范</h6>
                <pre>fm.json.$dirty && fm.json.$valid ( 染指并合法 ) = {{ fm.json.$dirty && fm.json.$valid }}</pre>
                <pre>fm.json.$error ( 错误 ) = {{ fm.json.$error }}</pre>
                <pre>fm.json.$error.json ( JSON ) = {{ fm.json.$error.json }}</pre>
                <script type="text/xianjs" ui-bs>
                    app.directive('jsonStr', [function() {
                            return {
                                require: 'ngModel',
                                link: function(scope, ele, attrs, c) {
                                    scope.$watch(attrs.ngModel, function(n,o) {
                                    if (n != "" && typeof n == 'string') {
                                        try { JSON.parse(n); c.$setValidity('json', (n.indexOf('{')>-1) );return; }
                                        catch(e) { c.$setValidity('json', false );}
                                    } else{
                                        c.$setValidity('json', true);//false 代表错误
                                    }
                                    });
                            }
                        }
                    }]);
                </script>
                <h2>提交按钮 </h2>
                <script type="text/xianjs" ui-bs>
                    <input type="button" class="btn btn-default" ng-click="clicksubmit()" value="提交">
                </script>
                <input type="button" class="btn btn-default" ng-click="clicksubmit()" value="提交">
                <pre>{{ fm | form }}</pre>
                <pre>( 染指 || 提交 ) 同时 ( 非法 )</pre>
                <pre>( ( fm.d1.$dirty || fm.submitted ) && fm.d1.$invalid ) </pre>
                <pre>ng-disabled = {{ ( fm.d1.$dirty || fm.submitted ) && fm.d1.$invalid }} </pre>
                <pre ng-show="( ( fm.d1.$dirty || fm.submitted ) && fm.d1.$invalid )">第一项出错了</pre>
                <input type="submit" ng-disabled="fm.$invalid" class="btn btn-default" value="实时判断提交">
                <pre>&lt;input type="submit" ng-disabled="fm.$invalid" /&gt;</pre>
            </form>
        </tab>
        <tab heading="校验全列举">
            <form name="form2" class="form-horizontal form-validation">
                <div class="form-group">
                    <label class="col-sm-3 control-label">Form</label>
                    <div class="col-sm-9"> <p class="form-control-static"><code> name="form2" </code></p></div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Required</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="required field" name="o01" ng-model="obj2.o01" required >
                        <span class="help-block m-b-none"><code> name="o01" ng-model="obj2.o01" required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o01 ] [ {{ obj2.o01 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o01.$error.required ] [ {{ form2.o01.$error.required }} ] </code></span>
                        <select class="form-control m-t" name="o02" ng-model="obj2.o02" required >
                            <option value="">Please choose</option> <option value="foo">Foo</option> <option value="bar">Bar</option>
                        </select>
                        <span class="help-block m-b-none"><code> name="o02" ng-model="obj2.o02" required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o02 ] [ {{ obj2.o02 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o02.$error.required ] [ {{ form2.o02.$error.required }} ] </code></span>
                        <label class="checkbox i-checks"> <input type="checkbox" name="o03" ng-model="obj2.o03" required><i></i> Agree to the policy </label>
                        <span class="help-block m-b-none"><code> name="o03" ng-model="obj2.o03" required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o03 ] [ {{ obj2.o03 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o03.$error.required ] [ {{ form2.o03.$error.required }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Min Length</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="minlength = 5" name="o04" ng-model="obj2.o04" ng-minlength=5 required>
                        <span class="help-block m-b-none"><code> name="o04" ng-model="obj2.o04" ng-minlength=5 required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o04 ] [ {{ obj2.o04 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o04.$error.required ] [ {{ form2.o04.$error.required }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o04.$error.minlength ] [ {{ form2.o04.$error.minlength }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Max Length</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="maxlength = 5" name="o05" ng-model="obj2.o05" ng-maxlength=5 required>
                        <span class="help-block m-b-none"><code> name="o05" ng-model="obj2.o05" ng-maxlength=5 required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o05 ] [ {{ obj2.o05 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o05.$error.required ] [ {{ form2.o05.$error.required }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o05.$error.maxlength ] [ {{ form2.o05.$error.maxlength }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Range Length</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="length = 5 ~ 10" name="o06" ng-model="obj2.o06" ng-minlength="5" ng-maxlength="10" required>
                        <span class="help-block m-b-none"><code> name="o06" ng-model="obj2.o06" ng-minlength="5" ng-maxlength="10" required </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Min</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="min = 5" name="o07" ng-model="obj2.o07" ui-validate=" '$value >= 5' ">
                        <span class="help-block m-b-none"><code> name="o07" ng-model="obj2.o07" ui-validate=" '$value &gt;= 5' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o07 ] [ {{ obj2.o07 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o07.$error.validator ] [ {{ form2.o07.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Max</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="max = 5" name="o08" ng-model="obj2.o08" ui-validate=" '$value <= 5' ">
                        <span class="help-block m-b-none"><code> name="o08" ng-model="obj2.o08" ui-validate=" '$value &lt;= 5' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o08 ] [ {{ obj2.o08 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o08.$error.validator ] [ {{ form2.o08.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Range</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="min = 5 max = 10"
                            name="o09" ng-model="obj2.o09" ui-validate="{ a:'$value >= 5', b:'$value <= 10' }">
                        <span class="help-block m-b-none"><code> name="o09" ng-model="obj2.o09" ui-validate="{ a:'$value >= 5', b:'$value &lt;= 10' }" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o09 ] [ {{ obj2.o09 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o09.$error.a ] [ {{ form2.o09.$error.a }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o09.$error.b ] [ {{ form2.o09.$error.b }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">RegExp</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="hexa color code" name="o10" ng-model="obj2.o10" ng-pattern="/^#(?:[0-9a-fA-F]{3}){1,2}$/">
                        <span class="help-block m-b-none"><code> name="o10" ng-model="obj2.o10" ng-pattern="/^#(?:[0-9a-fA-F]{3}){1,2}$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o10 ] [ {{ obj2.o10 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o10.$error.pattern ] [ {{ form2.o10.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Email</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" placeholder="email" ng-model="g.a" name="o11" ng-model="obj2.o11" >
                        <span class="help-block m-b-none"><code> name="o11" ng-model="obj2.o11" type="email" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o11 ] [ {{ obj2.o11 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o11.$error.email ] [ {{ form2.o11.$error.email }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Url</label>
                    <div class="col-sm-9">
                        <input type="url" class="form-control" placeholder="http://" name="o12" ng-model="obj2.o12" >
                        <span class="help-block m-b-none"><code> name="o12" ng-model="obj2.o12" type="url" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o12 ] [ {{ obj2.o12 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o12.$error.url ] [ {{ form2.o12.$error.url }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Digits</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="digits" ng-pattern="/^[0-9]+$/" name="o13" ng-model="obj2.o13" >
                        <span class="help-block m-b-none"><code> name="o13" ng-model="obj2.o13" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o13 ] [ {{ obj2.o13 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o13.$error.pattern ] [ {{ form2.o13.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Number</label>
                    <div class="col-sm-9">
                        <input type="number" class="form-control" placeholder="number" name="o14" ng-model="obj2.o14" >
                        <span class="help-block m-b-none"><code> name="o14" ng-model="obj2.o14" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o14 ] [ {{ obj2.o14 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o14.$error.number ] [ {{ form2.o14.$error.number }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Date Iso</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="YYYY-MM-DD" name="o15" ng-model="obj2.o15" ng-pattern="/[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$/" >
                        <span class="help-block m-b-none"><code> name="o15" ng-model="obj2.o15" ng-pattern="/[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o15 ] [ {{ obj2.o15 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o15.$error.pattern ] [ {{ form2.o15.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Phone</label>
                    <div class="col-sm-9">
                        <input type="text" class="form-control" placeholder="(XXX) XXXX XXX" name="o16" ng-model="obj2.o16" ng-pattern="/\([0-9]{3}\) ([0-9]{4}) ([0-9]{3})$/" >
                        <span class="help-block m-b-none"><code> name="o16" ng-model="obj2.o16" ng-pattern="/\([0-9]{3}\) ([0-9]{4}) ([0-9]{3})$/" </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o16 ] [ {{ obj2.o16 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o16.$error.pattern ] [ {{ form2.o16.$error.pattern }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Equal To</label>
                    <div class="col-sm-9">
                        <div class="row">
                            <div class="col-sm-6"><input type="text" class="form-control" name="o18" ng-model="obj2.o18" required></div>
                            <div class="col-sm-6"><input type="text" class="form-control" name="o19" ng-model="obj2.o19" ui-validate=" '$value==obj2.o18' " ui-validate-watch=" 'obj2.o18' "></div>
                        </div>
                        <span class="help-block m-b-none"><code> name="o18" ng-model="obj2.o18" required </code></span>
                        <span class="help-block m-b-none"><code> name="o19" ng-model="obj2.o19" ui-validate=" '$value==obj2.o18' " ui-validate-watch=" 'obj2.o18' " </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o19 ] [ {{ obj2.o19 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o19.$error.validator ] [ {{ form2.o19.$error.validator }} ] </code></span>
                    </div>
                </div>
                <div class="line line-dashed b-b line-lg pull-in"></div>
                <div class="form-group">
                    <label class="col-sm-3 control-label">Black-list</label>
                    <div class="col-sm-9">
                        <input type="email" class="form-control" placeholder="input 'bad@domain.com'"
                            name="o20" ng-model="obj2.o20" ui-validate="{blacklist : 'notBlackListed($value)' }" required>
                        <span ng-show='forma.email.$error.blacklist'>This e-mail is black-listed!</span>
                        <span class="help-block m-b-none"><code> name="o20" ng-model="obj2.o20" ui-validate="{blacklist : 'notBlackListed($value)' }" required </code></span>
                        <span class="help-block m-b-none">值 <code> [ obj2.o20 ] [ {{ obj2.o20 }} ] </code> (合法以后才会赋值)</span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.email ] [ {{ form2.o20.$error.email }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.required ] [ {{ form2.o20.$error.required }} ] </code></span>
                        <span class="help-block m-b-none">值 <code> [ form2.o20.$error.blacklist ] [ {{ form2.o20.$error.blacklist }} ] </code></span>
                    </div>
                </div>
                <button type="submit" class="btn btn-success">Submit</button>
            </form>
        </tab>
    </tabset>
</div>
